package com.example.springboot.pattern.state;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * @Desc
 * @Author houruiyang
 * @Date 2021/10/12
 **/
public class Event {

    @Getter
    private String eventCode;

    @Getter
    @Setter
    private Map<Object, Object> attributes = null;

    public Event(String eventCode) {
        this.eventCode = eventCode;
    }

    public Event(String eventCode, Map<Object, Object> attributes) {
        this.eventCode = eventCode;
        this.attributes = attributes;
    }

    @Override
    public String toString() {
        return eventCode;
    }

}
